package com.p2p.account.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.p2p.account.po.Online;
import com.p2p.account.service.OnlineService;
import com.p2p.account.vo.AccountSelect;
import com.p2p.common.base.BaseController;
import com.p2p.common.constants.Message;
import com.p2p.common.enums.ResponseEnum;
import com.p2p.common.utils.MD5Encryption;
import com.p2p.common.utils.StringUtils;
import com.p2p.common.utils.Underline2Camel;
import com.p2p.port.po.MonitorPort;

import com.p2p.wallet.po.Wallet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Allen on 2017/3/19.
 */
@RestController
@RequestMapping(value = "online")
public class OnlineController extends BaseController {
    private static final Logger logger = LoggerFactory.getLogger(OnlineController.class);
    @Autowired
    private OnlineService onlineService;
   
    /**
     * 获取用户列表
     *
     * @param request
     * @return
     */
    @RequestMapping(value = "selectOnline", method = RequestMethod.GET)
    public Map selectAccount(HttpServletRequest request) {
  
        List<Online> userList = onlineService.selectLists();
        Map result = new HashMap();
        result.put("rel", true);
        result.put("msg", "SUCCESS");
        result.put("list", userList);
        return result;
    }
  
}
